package com.example.wacoffee_manage.Service.Impl;

import com.example.wacoffee_manage.Mapper.couponMapper;
import com.example.wacoffee_manage.Service.couponService;
import com.example.wacoffee_manage.pojo.coupon;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class couponServiceImpl implements couponService {
    @Autowired
    private couponMapper couponMapper;

    @Override
    public List<coupon> getAll() {
        return couponMapper.getAll();
    }

    @Override
    public void add(coupon coupon) {
        couponMapper.add(coupon);
    }

    @Override
    public void delete(Integer id) {
        couponMapper.delete(id);
    }

    @Override
    public void update(coupon coupon) {
        couponMapper.update(coupon);
    }

    @Override
    public void updateStatus(Integer id, Integer status) {
        couponMapper.updateStatus(id,status);
    }

    @Override
    public coupon getById(Integer id) {
        return couponMapper.getById(id);
    }

}
